<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />

        <title><?php echo CHtml::encode($this->pageTitle); ?></title>

        <link type="text/css" rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/layout-default-latest.css" />
        <style type="text/css">
            html, body {
                background:	#666;
                width:		100%;
                height:		100%;					
                padding:	0;
                margin:		0;
                overflow:	auto; /* when page gets too small */
            }
            #container {
                background:	#999;
                height:		100%;
                margin:		0 auto;
                width:		100%;
                max-width:	900px;
                min-width:	700px;
                _width:		700px; /* min-width for IE6 */

                margin-top: 5px;
                margin-bottom: 5px;
                background: white;
                border: 1px solid #121c28;

            }

            .pane {
                display:	none; /* will appear when layout inits */
            }
        </style>

        <?php Yii::app()->clientScript->registerCoreScript('jquery') ?>                
        <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery.js"></script>
        <script type="text/javascript">

            $(document).ready(function () {
                $('#container').layout();                
            });

        </script>

    </head>
    <body>
        <div id="container"  class="">
<!--            <div class="pane ui-layout-center" id="center-content">
            </div>-->
            <div class="pane ui-layout-north">

<?php
$this->widget('application.extensions.menu.SMenu',
array(
"menu"=>array(
  array("url"=>array(
               "route"=>"/product/create"),
               "label"=>"Sspiner",
          array("url"=>array(
                       "route"=>"/product/create"),
                       "label"=>"Create product",),
          array("url"=>array(
                      "route"=>"/product/list"),
                      "label"=>"Product List",),
          array("url"=>"",
                       "label"=>"View Products",
          array("url"=>array(
                       "route"=>"/product/show",
                       "params"=>array("id"=>3),
                       "htmlOptions"=>array("title"=>"title")),
                       "label"=>"Product 3"),
            array("url"=>array(
                         "route"=>"/product/show",
                         "params"=>array("id"=>4)),
                         "label"=>"Product 4",
                array("url"=>array(
                             "route"=>"/product/show",
                             "params"=>array("id"=>5)),
                             "label"=>"Product 5")))),
          array("url"=>array(
                       "route"=>"/event/create"),
                       "label"=>"Scalendar"),
          array("url"=>array(),
                       "label"=>"Admin",
              array("url"=>array(
                           "route"=>"/event/admin"),
                           "label"=>"Scalendar Admin"),
                  array("url"=>array(
                               "route"=>"/product/admin"),
                               "label"=>"Sspinner Admin"),
                  array("url"=>array(
                               "route"=>"/product/admin"),
                               "label"=>"Disabled Link",
                               "disabled"=>true)),
          array("url"=>array(),
                       "label"=>"Documentation",
              array("url"=>array(
                           "link"=>"http://www.yiiframework.com",
                           "htmlOptions"=>array("target"=>"_BLANK")),
                           "label"=>"Yii Framework"),
              array("url"=>array(
                           "route"=>"site/spinnerDoc"),
                           "label"=>"Sspinner"),
              array("url"=>array(
                           "route"=>"site/calendarDoc"),
                           "label"=>"Scalendar"),
              array("url"=>array(
                           "route"=>"site/menuDoc"),
                           "label"=>"Smenu"),
                )
          ),
"stylesheet"=>"menu_blue.css",
"menuID"=>"myMenu",
"delay"=>3
)
);
?>
                <br/><br/>
                <?php
//                $this->widget('zii.widgets.CMenu', array(
//                    'items' => array(
//                        array('label' => 'Home', 'url' => array('/site/index')),
//                        array('label' => 'About', 'url' => array('/site/page', 'view' => 'about')),
//                        array('label' => 'Contact', 'url' => array('/site/contact')),
//                        array('label' => 'Login', 'url' => array('/site/login'), 'visible' => Yii::app()->user->isGuest),
//                        array('label' => 'Logout (' . Yii::app()->user->name . ')', 'url' => array('/site/logout'), 'visible' => !Yii::app()->user->isGuest)
//                    ),
//                ));                
                ?> 
            </div>

            <?php echo $content; ?>


<!--            <div class="pane ui-layout-south">South</div>
            <div class="pane ui-layout-east">East</div>
            <div class="pane ui-layout-west">West</div>-->
        </div>
    </body>
</html>
<script>
    $(document).ready(function () {
//        $('#center-content').html($('#content').html());
//        alert($('#content').html());
    });

</script>